type go/types.operand
120 uses
go/types (current package)
api_predicates.go#L34: x := operand{mode: value, typ: V}
api_predicates.go#L45: x := operand{mode: value, typ: V}
assignments.go#L24: func (check *Checker) assignment(x *operand, T Type, context string) {
assignments.go#L121: func (check *Checker) initConst(lhs *Const, x *operand) {
assignments.go#L156: func (check *Checker) initVar(lhs *Var, x *operand, context string) {
assignments.go#L215: var x operand
assignments.go#L235: var op operand
assignments.go#L252: func (check *Checker) assignVar(lhs, rhs ast.Expr, x *operand, context string) {
assignments.go#L271: x = new(operand)
assignments.go#L282: func operandTypes(list []*operand) (res []Type) {
assignments.go#L368: func (check *Checker) returnError(at positioner, lhs []*Var, rhs []*operand) {
assignments.go#L406: var x operand
badlinkname.go#L20: func badlinkname_Checker_infer(*Checker, positioner, []*TypeParam, []Type, *Tuple, []*operand, bool, *error_) []Type
builtins.go#L23: func (check *Checker) builtin(x *operand, call *ast.CallExpr, id builtinId) (_ bool) {
builtins.go#L51: var args []*operand // not valid for _Make, _New, _Offsetof, _Trace
builtins.go#L302: toFloat := func(x *operand) {
builtins.go#L752: check.record(&operand{mode, selx, obj.Type(), nil, 0})
builtins.go#L901: var t operand
builtins.go#L965: func (check *Checker) applyTypeFunc(f func(Type) Type, x *operand, id builtinId) Type {
call.go#L35: func (check *Checker) funcInst(T *target, pos token.Pos, x *operand, ix *indexedExpr, infer bool) ([]Type, []ast.Expr) {
call.go#L87: var args []*operand
call.go#L105: args = []*operand{{mode: value, expr: expr, typ: T.sig}}
call.go#L173: func (check *Checker) callExpr(x *operand, call *ast.CallExpr) exprKind {
call.go#L337: func (check *Checker) exprList(elist []ast.Expr) (xlist []*operand) {
call.go#L342: xlist = make([]*operand, n)
call.go#L344: var x operand
call.go#L359: func (check *Checker) genericExprList(elist []ast.Expr) (resList []*operand, targsList [][]Type, xlistList [][]ast.Expr) {
call.go#L387: var x operand
call.go#L402: resList = []*operand{&x}
call.go#L409: resList = make([]*operand, t.Len())
call.go#L411: resList[i] = &operand{mode: value, expr: e, typ: v.typ}
call.go#L415: resList = []*operand{&x}
call.go#L420: resList = make([]*operand, n)
call.go#L424: var x operand
call.go#L462: func (check *Checker) arguments(call *ast.CallExpr, sig *Signature, targs []Type, xlist []ast.Expr, args []*operand, atargs [][]Type, atxlist [][]ast.Expr) (rsig *Signature) {
call.go#L674: func (check *Checker) selector(x *operand, e *ast.SelectorExpr, def *TypeName, wantType bool) {
call.go#L1001: var x operand
const.go#L22: func (check *Checker) overflow(x *operand, opPos token.Pos) {
const.go#L239: func (check *Checker) representable(x *operand, typ *Basic) {
const.go#L254: func (check *Checker) representation(x *operand, typ *Basic) (constant.Value, Code) {
const.go#L277: func (check *Checker) invalidConversion(code Code, x *operand, target Type) {
const.go#L289: func (check *Checker) convertUntyped(x *operand, target Type) {
conversions.go#L20: func (check *Checker) conversion(x *operand, T Type) {
conversions.go#L139: func (x *operand) convertibleTo(check *Checker, T Type, cause *string) bool {
decl.go#L462: var x operand
decl.go#L505: var x operand
errors.go#L303: case *operand:
eval.go#L93: var x operand
expr.go#L73: func (check *Checker) op(m opPredicates, x *operand, op token.Token) bool {
expr.go#L129: func (check *Checker) unary(x *operand, e *ast.UnaryExpr) {
expr.go#L332: c := operand{old.mode, x, old.typ, old.val, 0}
expr.go#L357: func (check *Checker) implicitTypeAndValue(x *operand, target Type) (Type, constant.Value, Code) {
expr.go#L452: func (check *Checker) comparison(x, y *operand, op token.Token, switchCase bool) {
expr.go#L591: func (check *Checker) shift(x, y *operand, e ast.Expr, op token.Token) {
expr.go#L753: func (check *Checker) binary(x *operand, e ast.Expr, lhs, rhs ast.Expr, op token.Token, opPos token.Pos) {
expr.go#L754: var y operand
expr.go#L849: func (check *Checker) matchTypes(x, y *operand) {
expr.go#L859: mayConvert := func(x, y *operand) bool {
expr.go#L942: func (check *Checker) rawExpr(T *target, x *operand, e ast.Expr, hint Type, allowGeneric bool) exprKind {
expr.go#L966: func (check *Checker) nonGeneric(T *target, x *operand) {
expr.go#L995: func (check *Checker) exprInternal(T *target, x *operand, e ast.Expr, hint Type) exprKind {
expr.go#L1207: func (check *Checker) typeAssertion(e ast.Expr, x *operand, T Type, typeSwitch bool) {
expr.go#L1226: func (check *Checker) expr(T *target, x *operand, e ast.Expr) {
expr.go#L1233: func (check *Checker) genericExpr(x *operand, e ast.Expr) {
expr.go#L1244: func (check *Checker) multiExpr(e ast.Expr, allowCommaOk bool) (list []*operand, commaOk bool) {
expr.go#L1245: var x operand
expr.go#L1251: list = make([]*operand, t.Len())
expr.go#L1253: list[i] = &operand{mode: value, expr: e, typ: v.typ}
expr.go#L1259: list = []*operand{&x}
expr.go#L1261: x2 := &operand{mode: value, expr: e, typ: Typ[UntypedBool]}
expr.go#L1275: func (check *Checker) exprWithHint(x *operand, e ast.Expr, hint Type) {
expr.go#L1286: func (check *Checker) exprOrType(x *operand, e ast.Expr, allowGeneric bool) {
expr.go#L1294: func (check *Checker) exclude(x *operand, modeset uint) {
expr.go#L1321: func (check *Checker) singleValue(x *operand) {
format.go#L23: case operand:
format.go#L25: case *operand:
index.go#L19: func (check *Checker) indexExpr(x *operand, e *indexedExpr) (isFuncInst bool) {
index.go#L95: var key operand
index.go#L169: var k operand
index.go#L211: func (check *Checker) sliceExpr(x *operand, e *ast.SliceExpr) {
index.go#L353: var x operand
index.go#L378: func (check *Checker) isValidIndex(x *operand, code Code, what string, allowNegative bool) bool {
infer.go#L35: func (check *Checker) infer(posn positioner, tparams []*TypeParam, targs []Type, params *Tuple, args []*operand, reverse bool, err *error_) (inferred []Type) {
infer.go#L119: errorf := func(tpar, targ Type, arg *operand) {
literals.go#L48: func (check *Checker) basicLit(x *operand, e *ast.BasicLit) {
literals.go#L83: func (check *Checker) funcLit(x *operand, e *ast.FuncLit) {
literals.go#L111: func (check *Checker) compositeLit(x *operand, e *ast.CompositeLit, hint Type) {
literals.go#L389: var x operand
operand.go#L59: type operand struct {
operand.go#L69: func (x *operand) Pos() token.Pos {
operand.go#L113: func operandString(x *operand, qf Qualifier) string {
operand.go#L264: func (x *operand) String() string {
operand.go#L269: func (x *operand) setConst(k token.Token, lit string) {
operand.go#L298: func (x *operand) isNil() bool {
operand.go#L312: func (x *operand) assignableTo(check *Checker, T Type, cause *string) (bool, Code) {
recording.go#L18: func (check *Checker) record(x *operand) {
recording.go#L97: func (check *Checker) recordCommaOkTypes(x ast.Expr, a []*operand) {
stmt.go#L172: var x operand
stmt.go#L235: func (check *Checker) caseValues(x *operand, values []ast.Expr, seen valueMap) {
stmt.go#L238: var v operand
stmt.go#L305: func (check *Checker) caseTypes(x *operand, types []ast.Expr, seen map[Type]ast.Expr) Type {
stmt.go#L307: var dummy operand
stmt.go#L357: func (check *Checker) caseTypes_currently_unused(x *operand, xtyp *Interface, types []ast.Expr, seen map[string]ast.Expr) Type {
stmt.go#L359: var dummy operand
stmt.go#L442: var x operand
stmt.go#L463: var ch, val operand
stmt.go#L497: var x operand
stmt.go#L539: var x operand
stmt.go#L620: var x operand
stmt.go#L643: var x operand
stmt.go#L737: var sx *operand // switch expression against which cases are compared against; nil if invalid
stmt.go#L739: var x operand
stmt.go#L848: var x operand
stmt.go#L889: var x operand
stmt.go#L966: var y operand
stmt.go#L1007: var y operand
typexpr.go#L21: func (check *Checker) ident(x *operand, e *ast.Ident, def *TypeName, wantType bool) {
typexpr.go#L257: var x operand
typexpr.go#L274: var x operand
typexpr.go#L525: var x operand